home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 41
/
Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso
/
Aminet
/
gfx
/
edit
/
AmiCAD_2.07.lha
/
AmiCAD
/
ARexx
/
Simulation.AmiCAD
< prev
next >
Wrap
Text File
|
2000-11-11
|
2KB
|
54 lines
/* Lancement simulation analogique */
/* Version 1.01: 8 Mai 1999 (ajout guillemets autour du nom du fichier, pour espaces éventuels) */
/* Version 1.02: 11 Novembre 2000 (localisation anglais/français) */
/* $VER: 1.02 (© R.Florac, 11 Novembre 2000) */
options results /* indispensable pour récupérer le résultat des macros */
signal on error /* pour l'interception des erreurs */
signal on syntax
'LANGUAGE'
if result="français.language" then fr=1
else fr=0
parse arg fichier
if fichier="" then do
if fr=1 then 'REQFILE("Choix d''une netlist", "Spice", "*.cir")'
else 'REQFILE("Netlist file to simulate ?", "Spice", "*.cir")'
fichier=result
end
if fichier~="" then do
fichier_simulation='"RAM:'||ParseFileName(fichier)||'_spice"'
address command
'stack' " 64000"
if fr=1 then 'cd' " Travail:spice3f5"
else 'cd ' " Work:spice3f5"
arguments='"'||fichier||'"'||' -b -r '||fichier_simulation||' >CON:100/100/500/300/Spice/CLOSE/WAIT/SCREENAmiCAD'
address command
if fr=1 then 'Travail:spice3f5/bin/spice3f5full_040' arguments
else 'Work:spice3f5/bin/spice3f5full_040' arguments
end
exit
ParseFileName: procedure
parse arg FilePath, Part
DivPos = max(lastpos(':',FilePath),lastpos('/',FilePath))+1
if abbrev('FILE', upper(Part))
then return substr(FilePath, DivPos)
else
return strip(left(FilePath, DivPos-1),'T','/')
/* Traitement des erreurs, interruption du programme */
syntax:
erreur=RC
if fr=1 then 'MESSAGE("Erreur de syntaxe"+CHR(10)+"en ligne 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
else 'MESSAGE("Syntax error"+CHR(10)+"in line 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
exit
error:
if fr=1 then 'MESSAGE("Erreur en ligne 'SIGL'")'
else 'MESSAGE("Error in line 'SIGL'")'
exit